﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XuLyDuLieu.ClassDetails;

namespace XuLyDuLieu.Core
{
    abstract public class DataProcessing
    {
        #region "[enum]"
        public enum KieuChia
        { 
            TheoChieuRong,
            TheoChieuSau,
            NULL
        }
        public enum KieuDuLieu
        { 
            Numeric,
            Nominal
        }
        public enum KieuChuanHoa
        { 
            MIN_MAX,
            Z_SCORE,
            NULL
        }
        #endregion

        #region "[List menthod in Program is not override]"
        /// <summary>
        /// nhận dạng kiểu chia
        /// </summary>
        /// <param name="_isKieuChia">true: chia theo chiều rộng, false: chi theo chiều sâu</param>
        /// <returns></returns>
        abstract public  KieuChia NhanDangKieuChia(bool _isKieuChia);

        /// <summary>
        /// Doc file csv trả ra kiểu chuỗi
        /// </summary>
        /// <param name="_strPath">đường dẫn chứa file csv</param>
        /// <returns></returns>
        abstract public List<string> DocFileCSV(string _strPath);

        /// <summary>
        /// Điền giá tri bị thiếu cho các thuộc tính
        /// </summary>
        /// <param name="_strContent">nội dung dữ liệu cần điển</param>
        /// <returns></returns>
        abstract public List<Cot> DienGiaTriBiThieu(List<Cot> _listCot);

        /// <summary>
        /// chia giỏ thuộc tính
        /// </summary>
        /// <param name="_strContent">nội dung dữ liệu</param>
        /// <param name="_kieuChia">kiểu chia(true:theo chieu rong)</param>
        /// <returns></returns>
        abstract public List<NhomGio> ChiaGioThuocTinh(List<Cot> _cots, int _SoLuongGio, KieuChia _kieuChia);

        /// <summary>
        /// chuẩn hoa thuộc tính có kiểu numeric
        /// </summary>
        /// <param name="_strContent">nội dung dữ liệu</param>
        /// <returns></returns>
        abstract public List<ChuanHoaDuLieu> ChuanHoaThuocTinhCoKieuNumberic(List<Cot> _cots, double _dMin, double _dMax, KieuChuanHoa _kieuChuanHoa);

        abstract public List<DoiTuong> LayDanhSachCacDoiTuong(string _strContent);

        abstract public bool KiemTraKieuSo(string _strInput);

        abstract public List<Cot> LayDanhSachCacCot(List<string> _listContent);

        abstract public List<string> DanhSachThuocTinh(string _strTitle);

        abstract public DoiTuong LayThongTinDoiTuongTuChuoi(string _strInput);

        abstract public double TrungBinhCong(List<double> _listInput);

        abstract public string TimThuocTinhXuatHienNhieuNhat(List<DoiTuong> _listDoiTuong);

        abstract public bool KiemTraPhanTuXuatHienTrongMang(List<XuatHien> _list, DoiTuong _ItemCheck);

        abstract public int DemSoLuongGiaTriBiThieuTrongMotCot(Cot _cot);

        abstract public int DemSoGiaTriKhacNhauTrongMotCot(Cot _cot);

        abstract public List<XuatHien> TimTanSoXuatHienCuaDoiTuong(List<DoiTuong> _listDoiTuong);

        abstract public int DemSoMauKhongCoGiaTriTrungVoiMauKhac(Cot _cot);

        abstract public ThongKeTrenCotNumeric ThongKeCacThuocTinhTrenCot(Cot _cot);

        abstract public double TimGiaTriLonNhat(List<double> _listInput);

        abstract public double TimGiaTriNhoNhat(List<double> _listInput);

        abstract public double TimGiaTriTrungBinh(List<double> _listInput);

        abstract public double TimDoLechChuan(List<double> _listInput);

        abstract public bool GhiFile(List<string> _strContent, string _strPath);

        abstract public List<XuatHien> GomNhomDoiTuongKieuNumeric(List<DoiTuong> _listDoiTuongTemps);
        #endregion
    }
}
